package com.example.appuserserviceconsumer.controller;

import com.example.appuserserviceconsumer.feign.UserFeign;
import org.example.appcommons.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author linjl
 * @Date 2023-06-15
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserFeign userFeign;

    @GetMapping
    public User user(){
        User user = userFeign.getUser();
        System.out.println(user);
        return user;
    }

}
